﻿using MediatR;
using S_Gridding.Domains.BasicData;
using S_Gridding.Infrastructure.Interface;
using S_Gridding.Infrastructure.Interface.IWrite;
using S_Gridding.Read.Api.Command;

namespace S_Gridding.Read.Api.CommandHands
{
    /// <summary>
    /// 反填   网格类型管理信息 
    /// </summary>
    public class BackMeshTypeCommandHander : IRequestHandler<BackMeshTypeCommand, MeshTypeInfo>
    {
        private readonly IMeshTypeRepository _meshTypeRepository;  //注入 网格类型管理信息 

        public BackMeshTypeCommandHander(IMeshTypeRepository meshTypeRepository)
        {
            _meshTypeRepository = meshTypeRepository;
        }
        public async Task<MeshTypeInfo> Handle(BackMeshTypeCommand request, CancellationToken cancellationToken)
        {
            var list = await _meshTypeRepository.GetFindAsync(request.MeshTypeId);
            return list;
        }
    }
}
